<?php

namespace app\rental\validate;

use app\admin\model\RouteModel;
use think\Validate;

class RentalReserveValidate extends Validate
{
    protected $regex = [ 'mobile' => '^0{0,1}(17[0-9]|13[0-9]|15[0-9]|18[0-9])[0-9]{8}$'];
    protected $rule = [
        'brand'  => 'require',
        'model'  => 'require',
        'color'  => 'require',
        'name'  => 'require',
        'telephone'  => 'require|regex:mobile'
    ];
    protected $message = [
        'brand.require' => '请输入车辆品牌!',
        'model.require' => '请输入车辆型号!',
        'color.require' => '请输入车辆颜色!',
        'name.require' => '请输入联系人姓名!',
        'telephone.require' => '请输入联系人电话!',
        'telephone.regex' => '您输入的电话号码有误!'
    ];
}
